package com.haixee.parkdemo.auth.controller;

import com.haixee.parkdemo.auth.model.FieldRule;
import com.haixee.parkdemo.auth.service.FieldRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/field_rule")
public class FieldRuleController {

    @Autowired
    private FieldRuleService fieldRuleService;

    @GetMapping
    public List<FieldRule> get(String tableName) {
        return fieldRuleService.getByTable(tableName);
    }
}
